/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package conn;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author Administrator
 */
public class DB_funtion {
 public Connection getConnection()
    {
        Connection con=null;
        try {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            String url="jdbc:sqlserver://localhost:1433;instancename=NHATNTT-PC\\SQLEXPRESS;databasename=ManagerProduct";
            String username="sa";
            String pass="nhat01081986";
            con=DriverManager.getConnection(url, username, pass);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return con;
    }
}
